﻿<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    exclude-result-prefixes="xsl x">

	<xsl:output omit-xml-declaration="yes" method="html"/>

	<xsl:template match="/">

		<xml>
			<xsl:copy-of select="."/>
		</xml>

		<xsl:apply-templates select="Items"/>

	</xsl:template>

	<xsl:template match="Items">
		<ul>
			<xsl:apply-templates select="Item"/>
		</ul>

	</xsl:template>

	<xsl:template match="Item">

		<li>
			<a href="{@Url}">
				<xsl:if test="count(Item[@Current='True']) = 0 and @Current='True'">
					<xsl:attribute name="style">font-weight:bold;color:navy</xsl:attribute>
				</xsl:if>
				<xsl:value-of select="@Title" disable-output-escaping="yes"/>
			</a>
			<xsl:if test="@Current = 'True'">
				<ul style="margin-right:4px">
					<xsl:apply-templates select="Item" />
				</ul>
			</xsl:if>
		</li>

	</xsl:template>

	<xsl:template match="Item/Item">
		<div>
			<a href="{@Url}">
				<xsl:if test="count(Item[@Current='True']) = 0 and @Current='True'">
					<xsl:attribute name="style">font-weight:bold;color:navy</xsl:attribute>
				</xsl:if>
				<xsl:value-of select="@Title" disable-output-escaping="yes"/>
			</a>
		</div>
	</xsl:template>

</xsl:stylesheet>
